import Vue from 'vue'
import Router from 'vue-router'
import index from '@/index/index'

Vue.use(Router)

const guessing = ()=>import("@/index/guessing")
const guessing1 = ()=>import("@/index/guessing1")
const guessing2 = ()=>import("@/index/guessing2")
const index1 = ()=>import("@/index/index1")
const index2 = ()=>import("@/index/index2")
const experience = ()=>import("@/index/experience")
const experience1 = ()=>import("@/index/experience1")
const experience2 = ()=>import("@/index/experience2")
const products = ()=>import("@/index/products")
const Interaction = ()=>import("@/index/Interaction")
const Interactiondetails = ()=>import("@/index/Interactiondetails")
const Interactionbuss = ()=>import("@/index/Interactionbuss")
const InteracEa = ()=>import("@/index/InteracEa")
const InteracIn = ()=>import("@/index/InteracIn")
const InteracFu = ()=>import("@/index/InteracFu")
const products1 = ()=>import("@/index/products1")
const products2 = ()=>import("@/index/products2")
const details11 = ()=>import("@/details/details11")
const details12 = ()=>import("@/details/details12")
const details13 = ()=>import("@/details/details13")
const details21 = ()=>import("@/details/details21")
const details22 = ()=>import("@/details/details22")
const details23 = ()=>import("@/details/details23")
const details31 = ()=>import("@/details/details31")
const details32 = ()=>import("@/details/details32")
const details33 = ()=>import("@/details/details33")
const details41 = ()=>import("@/details/details41")
const details42 = ()=>import("@/details/details42")
const details43 = ()=>import("@/details/details43")
const SignIn = ()=>import("@/details/SignIn")
const wxlogin = ()=>import("@/details/wxlogin")
const register = ()=>import("@/details/register")
const personal = ()=>import("@/index/personal")
const commodity = ()=>import("@/index/commodity")
const business = ()=>import("@/business/business")
const bu41 = ()=>import("@/business/bu41")
const bu41details = ()=>import("@/business/bu41details")
const bu11 = ()=>import("@/business/bu11")
const bu12 = ()=>import("@/business/bu12")
const bu13 = ()=>import("@/business/bu13")
const bu21 = ()=>import("@/business/bu21")
const bu22 = ()=>import("@/business/bu22")
const bu23 = ()=>import("@/business/bu23")
const bu31 = ()=>import("@/business/bu31")
const bu32 = ()=>import("@/business/bu32")
const bu42 = ()=>import("@/business/bu42")
const bu43 = ()=>import("@/business/bu43")
const bu44 = ()=>import("@/business/bu44")
const bu45 = ()=>import("@/business/bu45")
const bu46 = ()=>import("@/business/bu46")
const buhjmd = ()=>import("@/business/buhjmd")
const bu47 = ()=>import("@/business/bu47")
const bu48 = ()=>import("@/business/bu48")
const bu51 = ()=>import("@/business/bu51")
const bu52 = ()=>import("@/business/bu52")
const bu53 = ()=>import("@/business/bu53")
const lkfgl1 = ()=>import("@/business/lkfgl1")
const lkfgl2 = ()=>import("@/business/lkfgl2")
const lkfgl3 = ()=>import("@/business/lkfgl3")
const lkfgl4 = ()=>import("@/business/lkfgl4")
const lzfmm = ()=>import("@/business/lzfmm")
const ltjxq = ()=>import("@/business/ltjxq")
const ltuik = ()=>import("@/business/ltuik")
const bussTuik = ()=>import("@/business/bussTuik")
const tousjb = ()=>import("@/business/tousjb")
const weiquan = ()=>import("@/business/weiquan")
const buhdbb = ()=>import("@/business/buhdbb")

const bu71 = ()=>import("@/business/bu71")
const bu72 = ()=>import("@/business/bu72")
const bu73 = ()=>import("@/business/bu73")
const bu74 = ()=>import("@/business/bu74")
const buIntegral = ()=>import("@/business/buIntegral")
const bu81 = ()=>import("@/business/bu81")
const bu82 = ()=>import("@/business/bu82")
const bu83 = ()=>import("@/business/bu83")
const buqykd = ()=>import("@/business/buqykd")
const bu91 = ()=>import("@/business/bu91")
const bu92 = ()=>import("@/business/bu92")
const bu93 = ()=>import("@/business/bu93")
const lsxxzx = ()=>import("@/business/lsxxzx")
const bu101 = ()=>import("@/business/bu101")
const bu102 = ()=>import("@/business/bu102")
const bu103 = ()=>import("@/business/bu103")
const bu104 = ()=>import("@/business/bu104")
const core = ()=>import("@/index/core")
const co11 = ()=>import("@/business/co11")
const co12 = ()=>import("@/business/co12")
const co13 = ()=>import("@/business/co13")
const co21 = ()=>import("@/business/co21")
const co22 = ()=>import("@/business/co22")
const co23 = ()=>import("@/business/co23")
const co24 = ()=>import("@/business/co24")
const co25 = ()=>import("@/business/co25")
const co31 = ()=>import("@/business/co31")
const co32 = ()=>import("@/business/co32")
const co33 = ()=>import("@/business/co33")
const co34 = ()=>import("@/business/co34")
const co41 = ()=>import("@/business/co41")
const co42 = ()=>import("@/business/co42")
const co51 = ()=>import("@/business/co51")
const co52 = ()=>import("@/business/co52")
const co52ds = ()=>import("@/business/co52ds")
const co53 = ()=>import("@/business/co53")
const co54 = ()=>import("@/business/co54")
const co55 = ()=>import("@/business/co55")
const co26 = ()=>import("@/business/co26")
const merchantRegister = ()=>import("@/business/merchantRegister")
const merchantSignIn = ()=>import("@/business/merchantSignIn")
const forgetPassword = ()=>import("@/business/forgetPassword")
const bussHelpIssue = ()=>import("@/business/bussHelpIssue")
const bussHelpOrder = ()=>import("@/business/bussHelpOrder")
const bussHelpRegulate = ()=>import("@/business/bussHelpRegulate")
const bussHelpRule = ()=>import("@/business/bussHelpRule")
const cs = ()=>import("@/business/cs")
const bussReportdetails = ()=>import("@/business/bussReportdetails")
const bussOrderdetails = ()=>import("@/business/bussOrderdetails")
const bussBank = ()=>import("@/business/bussBank")
const bussSetPassword = ()=>import("@/business/bussSetPassword")
const bussChangedPassword = ()=>import("@/business/bussChangedPassword")
const bussForgotPassword = ()=>import("@/business/bussForgotPassword")
const bussheadPortrait = ()=>import("@/business/bussheadPortrait")
const bussCouponIndex = ()=>import("@/business/bussCouponIndex")
const bussCoupon = ()=>import("@/business/bussCoupon")
const bussFreeCoupon = ()=>import("@/business/bussFreeCoupon")
const bussCouponDetails = ()=>import("@/business/bussCouponDetails")
const router = new Router({
   mode:'history',  //history模式去掉描点#
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/cs',
      name: 'cs',
      component: cs
    },
    {
      path: '/index1',
      name: 'index1',
      component: index1
    },
    {
      path: '/index2',
      name: 'index2',
      component: index2
    },
    {
      path: '/guessing',
      name: 'guessing',
      component: guessing
    },
    {
      path: '/guessing1',
      name: 'guessing1',
      component: guessing1
    },
    {
      path: '/guessing2',
      name: 'guessing2',
      component: guessing2
    },
    {
      path: '/Interaction',
      name: 'Interaction',
      component: Interaction
    },
    {
      path:'/Interactiondetails',
      name:'Interactiondetails',
      component:Interactiondetails
    },
    {
      path: '/Interactionbuss',
      name: 'Interactionbuss',
      component: Interactionbuss
    },
    {
      path: '/InteracEa',
      name: 'InteracEa',
      component: InteracEa
    },
    {
      path: '/InteracIn',
      name: 'InteracIn',
      component: InteracIn
    },
    {
      path: '/InteracFu',
      name: 'InteracFu',
      component: InteracFu
    },
    {
      path: '/experience',
      name: 'experience',
      component: experience
    },
    {
      path: '/experience1',
      name: 'experience1',
      component: experience1
    },
    {
      path: '/experience2',
      name: 'experience2',
      component: experience2
    },
    {
      path: '/products',
      name: 'products',
      component: products
    },
    {
      path: '/products1',
      name: 'products1',
      component: products1,
    },
    {
      path: '/products2',
      name: 'products2',
      component: products2,
    },
    {
      path: '/details11',
      name: 'details11',
      component: details11
    },
    {
      path: '/details12',
      name: 'details12',
      component: details12
    },
    {
      path: '/details13',
      name: 'details13',
      component: details13
    },
    {
      path: '/details21',
      name: 'details21',
      component: details21
    },
    {
      path: '/details22',
      name: 'details22',
      component: details22
    },
    {
      path: '/details23',
      name: 'details23',
      component: details23
    },
    {
      path: '/details31',
      name: 'details31',
      component: details31
    },
    {
      path: '/details32',
      name: 'details32',
      component: details32
    },
    {
      path: '/details33',
      name: 'details33',
      component: details33
    },
    {
      path: '/details41',
      name: 'details41',
      component: details41
    },
    {
      path: '/details42',
      name: 'details42',
      component: details42
    },
    {
      path: '/details43',
      name: 'details43',
      component: details43
    },
    {
      path: '/register',
      name: 'register',
      component: register
    },
    {
      path: '/SignIn',
      name: 'SignIn',
      component: SignIn
    },
    {
      path: '/personal',
      name: 'personal',
      component: personal
    },
    {
      path: '/commodity/:id',
      name: 'commodity',
      component: commodity
    },
    {
      path: '/business',
      name: 'business',
      component: business
    },
    {
      path: '/bu11',
      name: 'bu11',
      component: bu11
    },
    {
      path: '/bu12',
      name: 'bu12',
      component: bu12
    },
    {
      path: '/bu13',
      name: 'bu13',
      component: bu13
    },
    {
      path: '/bu21',
      name: 'bu21',
      component: bu21
    },
    
    {
      path: '/bu22',
      name: 'bu22',
      component: bu22
    },
    {
      path: '/bu23',
      name: 'bu23',
      component: bu23
    },
    {
      path: '/bu31',
      name: 'bu31',
      component: bu31
    },
    {
      path: '/bu32',
      name: 'bu32',
      component: bu32
    },
    {
      path: '/bu41',
      name: 'bu41',
      component: bu41
    },
    {
      path: '/bu41details',
      name: 'bu41details',
      component: bu41details
    },
    {
      path: '/bu42',
      name: 'bu42',
      component: bu42
    },
    {
      path: '/bu43',
      name: 'bu43',
      component: bu43
    },
    {
      path: '/bu44',
      name: 'bu44',
      component: bu44
    },
    {
      path: '/bu45',
      name: 'bu45',
      component: bu45
    },
    {
      path: '/bu46',
      name: 'bu46',
      component: bu46
    },
    {
      path: '/buhjmd',
      name: 'buhjmd',
      component: buhjmd
    },
    {
      path: '/bu47',
      name: 'bu47',
      component: bu47
    },
    {
      path: '/bu48',
      name: 'bu48',
      component: bu48
    },
    {
      path: '/bu51',
      name: 'bu51',
      component: bu51
    },
    {
      path: '/bu52',
      name: 'bu52',
      component: bu52
    },
    {
      path: '/bu53',
      name: 'bu53',
      component: bu53
    },
    {
      path: '/lkfgl1',
      name: 'lkfgl1',
      component: lkfgl1
    },
    {
      path: '/lkfgl2',
      name: 'lkfgl2',
      component: lkfgl2
    },
    {
      path: '/lkfgl3',
      name: 'lkfgl3',
      component: lkfgl3
    },
    {
      path: '/lkfgl4',
      name: 'lkfgl4',
      component: lkfgl4
    },
    {
      path: '/lzfmm',
      name: 'lzfmm',
      component: lzfmm
    },
    {
      path: '/ltjxq',
      name: 'ltjxq',
      component: ltjxq
    },
    {
      path: '/ltuik',
      name: 'ltuik',
      component: ltuik
    },
    {
      path: '/bussTuik',
      name: 'bussTuik',
      component: bussTuik
    },
    {
      path: '/tousjb',
      name: 'tousjb',
      component: tousjb
    },
    {
      path:'/weiquan',
      name:'weiquan',
      component:weiquan
    },
    {
      path:'/buhdbb',
      name:'buhdbb',
      component:buhdbb
    },
    {
      path: '/bu71',
      name: 'bu71',
      component: bu71
    },
    {
      path: '/bu72',
      name: 'bu72',
      component: bu72
    },
    {
      path: '/bu73',
      name: 'bu73',
      component: bu73
    },
    {
      path: '/bu74',
      name: 'bu74',
      component: bu74
    },
    {
      path: '/buIntegral',
      name: 'buIntegral',
      component: buIntegral
    },
    {
      path: '/bu81',
      name: 'bu81',
      component: bu81
    },
    {
      path: '/bu82',
      name: 'bu82',
      component: bu82
    },
    {
      path: '/bu83',
      name: 'bu83',
      component: bu83
    },
    {
      path: '/buqykd',
      name: 'buqykd',
      component: buqykd
    },
    {
      path: '/bu91',
      name: 'bu91',
      component: bu91
    },
    {
      path: '/bu92',
      name: 'bu92',
      component: bu92
    },
    {
      path: '/bu93',
      name: 'bu93',
      component: bu93
    },
    {
      path: '/lsxxzx',
      name: 'lsxxzx',
      component: lsxxzx
    },
    {
      path: '/bu101',
      name: 'bu101',
      component: bu101
    },
    {
      path: '/bu102',
      name: 'bu102',
      component: bu102
    },
    {
      path: '/bu103',
      name: 'bu103',
      component: bu103
    },
    {
      path: '/bu104',
      name: 'bu104',
      component: bu104
    },
    {
      path: '/core',
      name: 'core',
      component: core,
      children:[

      ]
    },
    {
      path: '/co11',
      name: 'co11',
      component: co11
    },
    {
      path: '/co12',
      name: 'co12',
      component: co12
    },
    {
      path: '/co13',
      name: 'co13',
      component: co13
    },
    {
      path: '/co21',
      name: 'co21',
      component: co21
    },
    {
      path: '/co22',
      name: 'co22',
      component: co22
    },
    {
      path: '/co23',
      name: 'co23',
      component: co23
    },
    {
      path: '/co24',
      name: 'co24',
      component: co24
    },
    {
      path: '/co25',
      name: 'co25',
      component: co25
    },
    {
      path: '/co31',
      name: 'co31',
      component: co31
    },
    {
      path: '/co32',
      name: 'co32',
      component: co32
    },
    {
      path: '/co34',
      name: 'co34',
      component: co34
    },
    {
      path: '/co33',
      name: 'co33',
      component: co33
    },
    {
      path: '/co41',
      name: 'co41',
      component: co41
    },
    {
      path: '/co42',
      name: 'co42',
      component: co42
    },
    {
      path: '/co51',
      name: 'co51',
      component: co51
    },
    {
      path: '/co52',
      name: 'co52',
      component: co52
    },
    {
      path: '/co52ds',
      name: 'co52ds',
      component: co52ds
    },
    {
      path: '/co53',
      name: 'co53',
      component: co53
    },
    {
      path: '/co54',
      name: 'co54',
      component: co54
    },
    {
      path: '/co55',
      name: 'co55',
      component: co55
    },
    {
      path: '/co26',
      name: 'co26',
      component: co26
    },
    {
      path: '/wxlogin',
      name: 'wxlogin',
      component: wxlogin 
    },
    {
      path: '/merchantRegister',
      name: 'merchantRegister',
      component: merchantRegister 
    },
    {
      path: '/merchantSignIn',
      name: 'merchantSignIn',
      component: merchantSignIn 
    },
    {
      path: '/forgetPassword',
      name: 'forgetPassword',
      component: forgetPassword 
    },
    {
      path: '/bussHelpIssue',
      name: 'bussHelpIssue',
      component: bussHelpIssue
    }, 
    {
      path: '/bussHelpOrder',
      name: 'bussHelpOrder',
      component: bussHelpOrder
    },
    {
      path: '/bussHelpRegulate',
      name: 'bussHelpRegulate',
      component: bussHelpRegulate
    },
    {
      path: '/bussHelpRule',
      name: 'bussHelpRule',
      component: bussHelpRule
    },
    {
      path: '/bussReportdetails',
      name: 'bussReportdetails',
      component: bussReportdetails
    },
    {
      path: '/bussOrderdetails',
      name: 'bussOrderdetails',
      component: bussOrderdetails
    },
    {
      path: '/bussBank',
      name: 'bussBank',
      component: bussBank
    },
    {
      path: '/bussSetPassword',
      name: 'bussSetPassword',
      component: bussSetPassword
    },
    {
      path: '/bussChangedPassword',
      name: 'bussChangedPassword',
      component:bussChangedPassword
    },
    {
      path: '/bussForgotPassword',
      name: 'bussForgotPassword',
      component:bussForgotPassword
    },
    {
      path: '/bussheadPortrait',
      name: 'bussheadPortrait',
      component: bussheadPortrait
    },
    {
      path: '/bussFreeCoupon',
      name: 'bussFreeCoupon',
      component:bussFreeCoupon
    },
    {
      path: '/bussCouponIndex',
      name: 'bussCouponIndex',
      component:bussCouponIndex
    },
    {
      path: '/bussCoupon',
      name: 'bussCoupon',
      component:bussCoupon
    },
    {
      path: '/bussCouponDetails',
      name: 'bussCouponDetails',
      component:bussCouponDetails
    }
  ],
  scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
  },
  
})
// 添加路由守卫
// router.beforeEach((to, from, next) => {
//   const isLogin = localStorage.eleToken ? true : false;
//   if (to.path == "/SignIn" || to.path == "/register") {
//     next();
//   } else {
//      isLogin ? next() : next("/SignIn");
//   }
// })

export default router;